package com.label.Model.Do;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.label.Utils.Common.InfoUtil;
import lombok.Data;

@TableName(value = "PERSONAS_CARD")
@Data
public class PersonsCard {

	@TableId(type = IdType.ASSIGN_ID )
    private Long id;

    private String name;

	private Long x;

	private Long y;

	private String  type;

	private String chart;

	@TableField(value = "requst")
	private String requst;

	@TableField(value = "persons_persons_id")
	private Long personsId;

	@JsonProperty
	private String theme() {
		if(personsId!=null)
			return InfoUtil.getPersonsTheme(personsId);
		return null;
	}

}
